<?php
namespace app\admin\controller;
use \think\Controller;
use \think\Db;
class Comment extends Controller
{
   public function index(){
			   	//获取视频类型
			   	$courses=Db::name("courses")->select();
			   	$this->assign("courses",$courses);
			   	//调用模型层，实现获取用户列表数据的功能
			   	//$videos=Db::name("videos")->select();
			   	//多表连接
			   	$comments=Db::query('select * from comments m,courses c where m.course_id=c.course_id order by m.comment_id desc');
			   	$this->assign("commentlist",$comments);
			   	return $this->fetch();
			}

}